<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <video src="./img/oceans-clip.mp4" controls></video>
    <div></div>
    <script>
        window.onload = function(){
            // 获取标签
            let video = document.querySelector("video")
            let div = document.querySelector("div")
            // 视频播放事件
            video.onplay = function(){
                div.innerHTML = "视频开始播放了"
            }
            // 视频暂停事件
            video.onpause = function(){
                console.log("3视频暂停");
            }
            // 视频音量改变事件
            video.onvolumechange = function(){
                console.log("4音量改变");
            }
        }
    </script>
</body>
</html>